<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> 
  <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">TI费用 By Region City Brand Channel Report</h2>
    </div>
    <!-- 标题 -->
    <div >
<form action="#" class="form-inline" method="post">
      <table class="row-margin-top tab-content table-bordered table" border="1">
          <tr>
            <td>
              Peroid:从
               <div class="form-group">
                     <label for="" class="form-label">一级考核期：</label>
                     <select name="cainian_start" id="cainian_start" style="min-width: 140px;width: 140px" class="form-control">
                           {volist name="cainian" id="cn"}
                            {if condition="$cn.id eq $data.cainian_start"}
                             <option value="{$cn.id}" selected>{$cn.title}</option>
                            {else/}
                              <option value="{$cn.id}">{$cn.title}</option>
                            {/if}              
                           {/volist}
                     </select>
                      <select name="kaohe_start" id="kaohe_start" style="min-width: 140px;width: 140px" class="form-control">
                          {volist name="kaohe1" id="cn"}
                            {if condition="$cn.id eq $data.kaohe_start"}
                             <option value="{$cn.id}" cid="{$cn.cid}" selected>{$cn.title}</option>
                            {else/}
                              <option value="{$cn.id}" cid="{$cn.cid}">{$cn.title}</option>
                            {/if}              
                           {/volist}
                     </select>
                     至
                        <select name="cainian_end" id="cainian_end" style="min-width: 140px;width: 140px" class="form-control">
                             {volist name="cainian" id="cn"}
                            {if condition="$cn.id eq $data.cainian_end"}
                             <option value="{$cn.id}" selected>{$cn.title}</option>
                            {else/}
                              <option value="{$cn.id}">{$cn.title}</option>
                            {/if}              
                           {/volist}
                     </select>
                      <select name="kaohe_end" id="kaohe_end" style="min-width: 140px;width: 140px" class="form-control">
                           {volist name="kaohe1" id="cn"}
                            {if condition="$cn.id eq $data.kaohe_end"}
                             <option value="{$cn.id}" cid="{$cn.cid}" selected>{$cn.title}</option>
                            {else/}
                              <option value="{$cn.id}" cid="{$cn.cid}">{$cn.title}</option>
                            {/if}              
                           {/volist}
                     </select>
               </div>
                 <input type="submit" class="btn btn-info query" value="查询"/>
                 <button class="btn btn-info LendExcel" type="button" onclick="daochu({$data.kaohe_start},{$data.kaohe_end})">导出Excel</button>
            </td>
          </tr>
      </table>
    
      <table class="table row-margin-top table-bordered text-right bud_hei">
          <tr class="info">
            <th class="text-center" rowspan="3" style="min-width: 150px;">分区</th>
            <th class="text-center" rowspan="3" style="min-width: 150px;">城市</th>
            <th class="text-center" colspan="{$allcounts}">{$str}</th>
            <th class="text-center" rowspan="3" style="min-width: 150px;">Total</th>
          </tr>
          <tr class="info">
            {volist name="channels" id="vo"}
            <th class="text-center" colspan="{$vo.counts}">{$vo.title}</th>
            {/volist}
          </tr>
          <tr class="info">
          {volist name="channels" id="vo"}
              {volist name="$vo.pros" id="vop"}
                 <th class="text-center" style="min-width: 100px;">{$vop}</th>
              {/volist}
                <th class="text-center" style="min-width: 100px;">Total</th>
          {/volist}
          
          </tr>
          
          {volist name="fenqu" id="f"}
            <!--循环市-->
              {volist name="shi" id="s"}
                {if condition="$f.id eq $s.zid"}
                    <tr>
                      <td class="text-center">{$s.fenqu}</td>
                      <td class="text-center">{$s.city}</td>
                         {volist name="$s.feiyong" id="fps"}
                             <td class="ObjectNum trTotal2">{$fps}</td>
                          {/volist}
                      <td class="ObjectNum trTotal2">{$s.zonge}</td>
                    </tr>
                {/if}

              {/volist}
             <tr class="font-bold warning">
                <td colspan="2" class="text-center">{$f.title}</td>
                  {volist name="$f.feiyong" id="fp"}
                     <td class="ObjectNum trTotal2">{$fp}</td>
                  {/volist}
                <td class="ObjectNum trTotal2">{$f.zonge}</td>
              </tr>
          {/volist}
          
           <tr class="trTotal font-bold">
            <td colspan="2" class="text-center">Total汇总</td>
              {if $feiyongt}
                {volist name="feiyongt" id="fpt"}
                     <td class="ObjectNum trTotal2">{$fpt}</td>
                  {/volist}
              {else/}
              <td></td>
              {/if}
            <td class="ObjectNum trTotal2">{$allfeiyong}</td>
          </tr>


        <!--  <tr>
            <td class="text-center">东南大区</td>
            <td class="text-center">福州市</td>
            <td class="ObjectNum">19688.11</td>
            <td class="ObjectNum trTotal2">1248846.63</td>
            <td class="ObjectNum trTotal2">11.11</td>
          </tr>
          <tr class="font-bold warning">
            <td colspan="2" class="text-center">东南大区汇总</td>
            <td class="ObjectNum">19688.11</td>
            <td class="ObjectNum trTotal2">1248846.63</td>
            <td class="ObjectNum trTotal2">11.11</td>
          </tr>
          <tr class="trTotal font-bold">
            <td colspan="2" class="text-center">Total汇总</td>
             <td class="ObjectNum">19688.11</td>
            <td class="ObjectNum trTotal2">1248846.63</td>
            <td class="ObjectNum trTotal2">11.11</td>
          </tr>-->
      </table>
</form>
    </div>
    <!-- 全局js -->
 <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
     <script src="__STATIC__/layout/js/common.js"></script>
    <script>
     function daochu(start,end){
      location.href="{:url('daochutipre')}?start="+start+"&end="+end;
    }
       $("#cainian_start").change(function(){
      startshanxuan();
       $("#kaohe_start option[cid="+$(this).val()+"]").eq(0).prop("selected",true);
    })
     $("#cainian_end").change(function(){
      endshanxuan();
       $("#kaohe_end option[cid="+$(this).val()+"]").eq(0).prop("selected",true);
    })
     function endshanxuan(){
      var cid=$("#cainian_end").val();
      $("#kaohe_end option[cid="+cid+"]").show();
      $("#kaohe_end option[cid!="+cid+"]").hide();

    }
    function startshanxuan(){
      var cid=$("#cainian_start").val();
      $("#kaohe_start option[cid="+cid+"]").show();
      $("#kaohe_start option[cid!="+cid+"]").hide();

    }
            $(document).ready(function(){
              startshanxuan(); endshanxuan();
            var $ObjectNum =$(".ObjectNum");
               toNum($ObjectNum);
        })
    </script>
</body>

</html>
